package com.dq.domain.statistics;

import com.dq.domain.base.BaseEntity;
import com.dq.domain.org.Org;
import com.dq.domain.sys.user.user.BossUser;
import com.dq.domain.sys.user.user.WxUser;
import com.dq.utils.TimeUtil;
import com.dq.vo.baseVo.VO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.ManyToOne;
import java.math.BigDecimal;

/**
 * @Author luchangtong
 * @Date 2020/4/16 9:56
 */
@Data
@Entity
@ApiModel("统计消费排行榜")
public class SaleStatistics extends BaseEntity implements VO.ToVO {

    @ApiModelProperty("门店")
    @ManyToOne
    protected WxUser wxUser;

    @ApiModelProperty("门店")
    @ManyToOne
    protected Org org;

    @ApiModelProperty("充值")
    @Column(columnDefinition="decimal(19,2) default 0.00")
    protected BigDecimal topPrice;
    @ApiModelProperty("消耗")
    @Column(columnDefinition="decimal(19,2) default 0.00")
    protected BigDecimal expendPrice;


    @Data
    @ApiModel("统计视图")
    public static class Vo implements VO{
        protected Long id;
    }


    @Override
    public VO toVO(boolean isRecursion) {
        Vo vo = new Vo();
        vo.id = this.getId();

        return vo;
    }
}
